/**
 * @file linked_stack.h
 * Definition file for a generic LinkedStack data structure
 * @author Denis Ollier
 * @ingroup LinkedStack
 *
 * @todo Documentation
 * @todo Comment functions.
 */

#ifndef LINKED_STACK_H
#define LINKED_STACK_H

#include <yadl_common.h>

/** The LinkedStack object. */
typedef struct cell** linked_stack;

/**
 *
 * @param lkd_stk
 * @return
 * @retval
 * @todo Not implemented yet.
 */
linked_stack linked_stack_clone (linked_stack lkd_stk);

/**
 *
 * @param lkd_stk
 * @todo Test the function.
 */
void linked_stack_dispose (linked_stack lkd_stk);

/**
 *
 * @param lkd_stk
 * @retval 0 if the linked_stack is not empty.
 * @retval 1 if the linked_stack is empty.
 * @todo Test the function.
 */
unsigned int linked_stack_is_empty (linked_stack lkd_stk);

/**
 *
 * @param lkd_stk
 * @return
 * @retval NULL if an error occured while linked_stack creation.
 * @todo Test the function.
 */
linked_stack linked_stack_new (void);

/**
 *
 * @param lkd_stk
 * @return
 * @retval NULL if the linked_stack is empty.
 * @todo Test the function.
 */
void* linked_stack_peek (linked_stack lkd_stk);

/**
 *
 * @param lkd_stk
 * @return
 * @retval NULL if the linked_stack is empty.
 * @todo Test the function.
 */
void* linked_stack_pop (linked_stack lkd_stk);

/**
 *
 * @param lkd_stk
 * @retval 0
 * @retval 1
 * @todo Test the function.
 */
unsigned int linked_stack_push (linked_stack lkd_stk, void* element);

/**
 *
 * @param lkd_stk
 * @return
 * @todo Test the function.
 */
int linked_stack_search (linked_stack lkd_stk, void* element);

#endif /* LINKED_STACK_H */
